<template>
	<div class='index-detail'>
	  <detail-item :items="company" :nr="nr"/>
	</div>
</template>

<script>
	const api = require('../../../../wxapi/config.js')
	import DetailItem from "../../../../component/show-detail/ShowDetail"
	export default {
		components: {
			DetailItem
		},
		data () {
			return {
				company: {},
				nr: '',
				id: ''
			}
		},
		onLoad(options) {
			this.getCompany(options.id)
			this.id = options.id
		},
		methods: {
			getCompany(val) {
				api.getRecommendDetail({ id: val }).then((res) => {
					this.company = res.data[0];
					this.nr = res.data[0].nr.replace(/\<img/gi, '<img style="width:100% !important;height:auto"')
				})
			}
		}
	}
</script>

<style>
</style>
